<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
$config = JFactory::getConfig();
$joomlaLangCode = $config->getValue('language');
?>
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.4.1");
	google.setOnLoadCallback(function(){
		jQuery.noConflict();
		jQuery(function($){
			var langSelect = {
			  'AFRIKAANS' : 'af',
			  'ALBANIAN' : 'sq',
			  'AMHARIC' : 'am',
			  'ARABIC' : 'ar',
			  'ARMENIAN' : 'hy',
			  'AZERBAIJANI' : 'az',
			  'BASQUE' : 'eu',
			  'BELARUSIAN' : 'be',
			  'BENGALI' : 'bn',
			  'BIHARI' : 'bh',
			  'BULGARIAN' : 'bg',
			  'BURMESE' : 'my',
			  'CATALAN' : 'ca',
			  'CHEROKEE' : 'chr',
			  'CHINESE' : 'zh',
			  'CHINESE_SIMPLIFIED' : 'zh-CN',
			  'CHINESE_TRADITIONAL' : 'zh-TW',
			  'CROATIAN' : 'hr',
			  'CZECH' : 'cs',
			  'DANISH' : 'da',
			  'DHIVEHI' : 'dv',
			  'DUTCH': 'nl',  
			  'ENGLISH' : 'en',
			  'ESPERANTO' : 'eo',
			  'ESTONIAN' : 'et',
			  'FILIPINO' : 'tl',
			  'FINNISH' : 'fi',
			  'FRENCH' : 'fr',
			  'GALICIAN' : 'gl',
			  'GEORGIAN' : 'ka',
			  'GERMAN' : 'de',
			  'GREEK' : 'el',
			  'GUARANI' : 'gn',
			  'GUJARATI' : 'gu',
			  'HEBREW' : 'iw',
			  'HINDI' : 'hi',
			  'HUNGARIAN' : 'hu',
			  'ICELANDIC' : 'is',
			  'INDONESIAN' : 'id',
			  'INUKTITUT' : 'iu',
			  'ITALIAN' : 'it',
			  'JAPANESE' : 'ja',
			  'KANNADA' : 'kn',
			  'KAZAKH' : 'kk',
			  'KHMER' : 'km',
			  'KOREAN' : 'ko',
			  'KURDISH': 'ku',
			  'KYRGYZ': 'ky',
			  'LAOTHIAN': 'lo',
			  'LATVIAN' : 'lv',
			  'LITHUANIAN' : 'lt',
			  'MACEDONIAN' : 'mk',
			  'MALAY' : 'ms',
			  'MALAYALAM' : 'ml',
			  'MALTESE' : 'mt',
			  'MARATHI' : 'mr',
			  'MONGOLIAN' : 'mn',
			  'NEPALI' : 'ne',
			  'NORWEGIAN' : 'no',
			  'ORIYA' : 'or',
			  'PASHTO' : 'ps',
			  'PERSIAN' : 'fa',
			  'POLISH' : 'pl',
			  'PORTUGUESE' : 'pt-PT',
			  'PUNJABI' : 'pa',
			  'ROMANIAN' : 'ro',
			  'RUSSIAN' : 'ru',
			  'SANSKRIT' : 'sa',
			  'SERBIAN' : 'sr',
			  'SINDHI' : 'sd',
			  'SINHALESE' : 'si',
			  'SLOVAK' : 'sk',
			  'SLOVENIAN' : 'sl',
			  'SPANISH' : 'es',
			  'SWAHILI' : 'sw',
			  'SWEDISH' : 'sv',
			  'TAJIK' : 'tg',
			  'TAMIL' : 'ta',
			  'TAGALOG' : 'tl',
			  'TELUGU' : 'te',
			  'THAI' : 'th',
			  'TIBETAN' : 'bo',
			  'TURKISH' : 'tr',
			  'UKRAINIAN' : 'uk',
			  'URDU' : 'ur',
			  'UZBEK' : 'uz',
			  'UIGHUR' : 'ug',
			  'VIETNAMESE' : 'vi',
			  'UNKNOWN' : ''
			};
			for (var l in langSelect) {
				$("#srcLangCode").append("<option value=\""+langSelect[l]+"\">"+l+"</option>");
				$("#tarLangCode").append("<option value=\""+langSelect[l]+"\">"+l+"</option>");
			}
		});
	});
</script>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Source Language' ); ?></legend>

		<table class="admintable">
		<tr>
			<td width="100" align="right" class="key">
				<label for="srcLangCode">
					<?php echo JText::_( 'Source Language Code' ); ?>:
				</label>
			</td>
			<td>
				<select id="srcLangCode" name="srcLangCode"></select>
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="srcLangDir">
					<?php echo JText::_( 'Source Language Directory' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="srcLangDir" id="srcLangDir" size="5" maxlength="5" value="" />
			</td>
		</tr>
		</table>
	</fieldset>
	
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Target Language' ); ?></legend>
		
		<table class="admintable">
		<tr>
			<td width="100" align="right" class="key">
				<label for="tarLangCode">
					<?php echo JText::_( 'Target Language Code' ); ?>:
				</label>
			</td>
			<td>
				<select id="tarLangCode" name="tarLangCode"></select>
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="tarLangDir">
					<?php echo JText::_( 'Target Language Directory' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="tarLangDir" id="tarLangDir" size="5" maxlength="5" value="" />
			</td>
		</tr>
		</table>
	</fieldset>
	
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Language Real Path' ); ?></legend>
		
		<table class="admintable">
		<tr>
			<td width="100" align="right" class="key">
				<label for="langDir">
					<?php echo JText::_( 'Language Directory' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="langDir" id="langDir" size="35" maxlength="255" value="" />
			</td>
		</tr>
		</table>
	</fieldset>
</div>
<div class="clr"></div>
<input type="hidden" name="option" value="com_joomlainitranslator" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="translator" />
<input type="hidden" name="status" value="never" />
</form>
